package com.lagou.StageTwo.Assignment3.Service.Impl;

import com.lagou.StageTwo.Assignment3.Service.InternetService;
import com.lagou.StageTwo.Assignment3.po.PackagesAbstract;
import com.lagou.StageTwo.Assignment3.po.PhoneCard;

/**
 * （3）上网套餐类 特征：上网流量、每月资费 行为：显示所有套餐信息
 * @author 常红伟
 */
public class OnlinePackageImpl extends PackagesAbstract implements InternetService {

    /**
     * 上网流量
     */
   private String internetTraffic;



    public OnlinePackageImpl() {
    }

    public OnlinePackageImpl(String internetTraffic, String monthlyRates) {
        super(monthlyRates);
       setInternetTraffic(internetTraffic);

    }

    public String getInternetTraffic() {
        return internetTraffic;
    }

    public void setInternetTraffic(String internetTraffic) {
        this.internetTraffic = internetTraffic;
    }



    /**
     * 行为：显示所有套餐信息
     */
    @Override
    public void show(){
        System.out.println("该套餐每月上网流量为:"+internetTraffic+",每月费用为："+getMonthlyRates());
    }

    @Override
    public void internetPackages(String internetTraffic, PhoneCard phoneCard) {
        System.out.println("测试上网");
    }
}
